.class public abstract Lcom/bitauto/autoeasy/tool/ArrayListAdapter;
.super Landroid/widget/BaseAdapter;
.source "ArrayListAdapter.java"


# annotations
.annotation system Ldalvik/annotation/Signature;
    value = {
        "<T:",
        "Ljava/lang/Object;",
        ">",
        "Landroid/widget/BaseAdapter;"
    }
.end annotation


# instance fields
.field protected mContext:Landroid/app/Activity;

.field protected mList:Ljava/util/ArrayList;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/ArrayList",
            "<TT;>;"
        }
    .end annotation
.end field

.field protected mListView:Landroid/widget/ListView;


# direct methods
.method public constructor <init>(Landroid/app/Activity;)V
    .locals 0
    .parameter "context"

    .prologue
    .line 18
    .local p0, this:Lcom/bitauto/autoeasy/tool/ArrayListAdapter;,"Lcom/bitauto/autoeasy/tool/ArrayListAdapter<TT;>;"
    invoke-direct {p0}, Landroid/widget/BaseAdapter;-><init>()V

    .line 19
    iput-object p1, p0, Lcom/bitauto/autoeasy/tool/ArrayListAdapter;->mContext:Landroid/app/Activity;

    .line 20
    return-void
.end method


# virtual methods
.method public getCount()I
    .locals 1

    .prologue
    .line 24
    .local p0, this:Lcom/bitauto/autoeasy/tool/ArrayListAdapter;,"Lcom/bitauto/autoeasy/tool/ArrayListAdapter<TT;>;"
    iget-object v0, p0, Lcom/bitauto/autoeasy/tool/ArrayListAdapter;->mList:Ljava/util/ArrayList;

    if-eqz v0, :cond_0

    .line 25
    iget-object v0, p0, Lcom/bitauto/autoeasy/tool/ArrayListAdapter;->mList:Ljava/util/ArrayList;

    invoke-virtual {v0}, Ljava/util/ArrayList;->size()I

    move-result v0

    .line 27
    :goto_0
    return v0

    :cond_0
    const/4 v0, 0x0

    goto :goto_0
.end method

.method public getItem(I)Ljava/lang/Object;
    .locals 1
    .parameter "position"

    .prologue
    .line 32
    .local p0, this:Lcom/bitauto/autoeasy/tool/ArrayListAdapter;,"Lcom/bitauto/autoeasy/tool/ArrayListAdapter<TT;>;"
    iget-object v0, p0, Lcom/bitauto/autoeasy/tool/ArrayListAdapter;->mList:Ljava/util/ArrayList;

    if-nez v0, :cond_0

    const/4 v0, 0x0

    :goto_0
    return-object v0

    :cond_0
    iget-object v0, p0, Lcom/bitauto/autoeasy/tool/ArrayListAdapter;->mList:Ljava/util/ArrayList;

    invoke-virtual {v0, p1}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object;

    move-result-object v0

    goto :goto_0
.end method

.method public getItemId(I)J
    .locals 2
    .parameter "position"

    .prologue
    .line 37
    .local p0, this:Lcom/bitauto/autoeasy/tool/ArrayListAdapter;,"Lcom/bitauto/autoeasy/tool/ArrayListAdapter<TT;>;"
    int-to-long v0, p1

    return-wide v0
.end method

.method public getList()Ljava/util/ArrayList;
    .locals 1
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "()",
            "Ljava/util/ArrayList",
            "<TT;>;"
        }
    .end annotation

    .prologue
    .line 49
    .local p0, this:Lcom/bitauto/autoeasy/tool/ArrayListAdapter;,"Lcom/bitauto/autoeasy/tool/ArrayListAdapter<TT;>;"
    iget-object v0, p0, Lcom/bitauto/autoeasy/tool/ArrayListAdapter;->mList:Ljava/util/ArrayList;

    return-object v0
.end method

.method public getListView()Landroid/widget/ListView;
    .locals 1

    .prologue
    .line 61
    .local p0, this:Lcom/bitauto/autoeasy/tool/ArrayListAdapter;,"Lcom/bitauto/autoeasy/tool/ArrayListAdapter<TT;>;"
    iget-object v0, p0, Lcom/bitauto/autoeasy/tool/ArrayListAdapter;->mListView:Landroid/widget/ListView;

    return-object v0
.end method

.method public abstract getView(ILandroid/view/View;Landroid/view/ViewGroup;)Landroid/view/View;
.end method

.method public setList(Ljava/util/ArrayList;)V
    .locals 0
    .parameter
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Ljava/util/ArrayList",
            "<TT;>;)V"
        }
    .end annotation

    .prologue
    .line 44
    .local p0, this:Lcom/bitauto/autoeasy/tool/ArrayListAdapter;,"Lcom/bitauto/autoeasy/tool/ArrayListAdapter<TT;>;"
    .local p1, list:Ljava/util/ArrayList;,"Ljava/util/ArrayList<TT;>;"
    iput-object p1, p0, Lcom/bitauto/autoeasy/tool/ArrayListAdapter;->mList:Ljava/util/ArrayList;

    .line 45
    invoke-virtual {p0}, Lcom/bitauto/autoeasy/tool/ArrayListAdapter;->notifyDataSetChanged()V

    .line 46
    return-void
.end method

.method public setList([Ljava/lang/Object;)V
    .locals 4
    .parameter "list"
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "([TT;)V"
        }
    .end annotation

    .prologue
    .line 53
    .local p0, this:Lcom/bitauto/autoeasy/tool/ArrayListAdapter;,"Lcom/bitauto/autoeasy/tool/ArrayListAdapter<TT;>;"
    new-instance v0, Ljava/util/ArrayList;

    array-length v2, p1

    invoke-direct {v0, v2}, Ljava/util/ArrayList;-><init>(I)V

    .line 54
    .local v0, arrayList:Ljava/util/ArrayList;,"Ljava/util/ArrayList<TT;>;"
    array-length v2, p1

    const/4 v3, 0x0

    :goto_0
    if-lt v3, v2, :cond_0

    .line 57
    invoke-virtual {p0, v0}, Lcom/bitauto/autoeasy/tool/ArrayListAdapter;->setList(Ljava/util/ArrayList;)V

    .line 58
    return-void

    .line 54
    :cond_0
    aget-object v1, p1, v3

    .line 55
    .local v1, t:Ljava/lang/Object;,"TT;"
    invoke-virtual {v0, v1}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z

    .line 54
    add-int/lit8 v3, v3, 0x1

    goto :goto_0
.end method

.method public setListView(Landroid/widget/ListView;)V
    .locals 0
    .parameter "listView"

    .prologue
    .line 65
    .local p0, this:Lcom/bitauto/autoeasy/tool/ArrayListAdapter;,"Lcom/bitauto/autoeasy/tool/ArrayListAdapter<TT;>;"
    iput-object p1, p0, Lcom/bitauto/autoeasy/tool/ArrayListAdapter;->mListView:Landroid/widget/ListView;

    .line 66
    return-void
.end method
